package org.zn.mvcbase.response;

public class JqGridConverter implements DataConverter{

	@Override
	public ResponseMessage converter(Metadata md, ResponseMessage rm) {
		
		
		JqgridMessage jg=(JqgridMessage) rm;
		
		jg.setStatus(md.getState());
		jg.setMessage(md.getState());
		
		jg.setPage(md.getPage().getPageNum());
		
		jg.setRows(md.getPage().getList());
		jg.setTotal(md.getPage().getPages());
		
		jg.setRecords(md.getPage().getTotal());
		
		return jg;
	}

}
